<template>
  <div>
    <!-- $refs的使用 -->
    <h1 id="h" ref="bigH1">赖酱 is pig</h1>
    <h1>2.ref获取组件对象</h1>
    <!-- 1.先给要获取的组件设置一个ref -->
    <demo ref="de"></demo>
  </div>
</template>

<script>
import Demo from './components/Demo.vue';

export default {
  components: { Demo },
  mounted() {
    console.log(document.querySelector("#h"));
    console.log((this.$refs.bigH1));
    this.$refs.de.msg
    this.$refs.de.fn()
  },
  
};
</script>

<style lang="scss" scoped>
</style>